/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.service;

import cz.muni.restinterface.CourierDTO;
import cz.muni.entities.Courier;
import java.util.List;
import javax.ejb.Local;

/**
 * Service layer interface
 * Offers all methods for work with couriers
 * @author unknown
 */
@Local
public interface CourierServiceLocal {
    
    /**
     * Creates courier in database
     * @param courierDTO 
     */
    public void create(CourierDTO courierDTO);
    
    /**
     * Deletes courier from database
     * @param courierDTO 
     */
    public void delete(CourierDTO courierDTO);
    
    /**
     * Finds courier in database
     * @param id of the courier
     * @return courier
     */
    public CourierDTO find(Long id);
    
    /**
     * Updates courier in database
     * @param courierDTO
     * @return courier
     */
    public CourierDTO update(CourierDTO courierDTO);
    
    /**
     * Finds all couriers in database
     * @return list of found couriers
     */
    public List<CourierDTO> findAll();
}
